using UnityEngine;
using QFramework;
using QAssetBundle;

namespace ProjectSurviver
{
	public partial class Exp : PowerUp
	{
        public override Collider2D Collider2D => SelfCollider2D;
		
        void OnTriggerEnter2D(Collider2D other)
        {
			if(other.GetComponent<CollectableArea>())
			{
				FlyingToPlayer = true;
			}
        }

		protected override void Execute()
		{
			AudioKit.PlaySound(Sfx.EXP);
			Global.Exp.Value++;
			this.DestroyGameObjGracefully();
		}
    }
}
